package spec.lijunyao.unit4.outclazz.animal;

public class Frog extends Animal implements IAnimal {
    String liangQi;

    public Frog() {
    }

    public Frog(String name, String food, String area, String lq) {
        super(name, food, area);
        this.liangQi = lq;
    }

    @Override
    String findFood() {
        return super.name + "找" + super.food;
    }

    @Override
    public String born() {
        return "出生";
    }

    @Override
    public String old() {
        return "慢慢变老";
    }

    @Override
    public String sick() {
        return "老了会生病";
    }

    @Override
    public String die() {
        return "久病会死";
    }

    String wholeLife(){
        //定义
        String b;
        //初始化
        b = born();
        // 定义的同时初始化
        String ff = findFood();
        String e  = eat();
        String s = sick();
        String o = old();
        return b + "\n" + ff + e + s + o;
    }

}